﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;

namespace GLAD_prototype
{
    public class artistMap : ClassMap<artist>
    {
        public artistMap()
        {
            //Id(x => x.Id);
            Id(x => x.artistID);
            Map(x => x.namaArtist);
            Map(x => x.descArtist);
            Table("artist");
        }
    }
    public class transaksiBeliMap : ClassMap<transaksiBeli>
    {
        public transaksiBeliMap()
        {
            //Id(x => x.Id);
            Id(x => x.transID);
            Map(x => x.waktuTrans);
            Map(x => x.totalHarga);
            Map(x => x.namaPenerima);
            Map(x => x.almtPenerima);
            Map(x => x.provinsi);
            Map(x => x.kotaKab);
            Map(x => x.kodepos);
            Map(x => x.bankTujuan);
            Map(x => x.konfirmasi);
            Map(x => x.statusKirim);
            References(x => x.User).Column("userID");
            Table("transaksiBeli");
        }
    }
    public class albumMap : ClassMap<album>
    {
        public albumMap()
        {
            //Id(x => x.Id);
            Id(x => x.albumID);
            Map(x => x.genre);
            Map(x => x.judulAlbum);
            Map(x => x.albumArt);
            Map(x => x.label);
            Map(x => x.tglRilis);
            Map(x => x.tipeKeping);
            Map(x => x.userRating);
            Map(x => x.userCount);
            Map(x => x.descAlbum);
            Table("album");
        }
    }
    public class detilTransaksiMap : ClassMap<detilTransaksi>
    {
        public detilTransaksiMap()
        {
            Id(x => x.Id);
            Map(x => x.jumlahOrder);
            References(x => x.Album).Column("albumID");
            References(x => x.Trans).Column("transID");
            Table("detilTransaksi");
        }
    }
    public class laguMap : ClassMap<lagu>
    {
        public laguMap()
        {
            //Id(x => x.Id);
            Id(x => x.songID);
            Map(x => x.judulLagu);
            Map(x => x.durasi);
            Map(x => x.descLagu);
            References(x => x.Album).Column("albumID");
            References(x => x.Artist).Column("artistID");
            Table("lagu");
        }
    }
    public class penggunaMap : ClassMap<pengguna>
    {
        public penggunaMap()
        {
            //Id(x => x.Id);
            Id(x => x.userID);
            Map(x => x.username);
            Map(x => x.pass);
            Map(x => x.email);
            Map(x => x.fullName);
            Map(x => x.telp);
            Map(x => x.status);
            Table("pengguna");
        }
    }
}
